home *** CD-ROM | disk | FTP | other *** search
- /* vector-matrix.h */
- /* written by : Jason R. Wilson 2/21/93 */
-
- /* this package provides basic vector and matrix manipulations */
-
-
- Vector Sub(Vector vec1, Vector vec2);
- /* This function returns the difference of the first and second vectors */
-
- Vector Add(Vector vec1, Vector vec2);
- /* This function returns the sum of the first and second vectors */
-
- double Length(Vector vec);
- /* This function returns the length of a vector */
-
- Vector Normalize(Vector vec);
- /* This function returns the normalized vector parameters */
-
- Vector Scale(Vector vec, double scale);
- /* scales the 3D vector (multiplies each component by the 'scale')*/
-
- double Dotprod(Vector vec1, Vector vec2);
- /* This function returns the dot product of the two vectors given. */
-
- Vector Cross(Vector vec1, Vector vec2);
- /* This function returns the cross product of the two vectors given. */
-
- void Transpose (Matrix *a, Matrix *b);
- /* this routine puts the transpose of matrix a into matrix b */
-
- void pointMultiply(Point a, double *b, double *c);
- /* Multiplies the n-1-element point, a, by the nxn matrix, b, to produce the
- n-element point, c. */
-
- void matrixMultiply (int n, double *a, double *b, double *c);
- /* Multiplies the nxn matrix a by the nxn matrix b to produce the nxn matrix
- c. */
-
- void createIdentity (int n, double *a);
- /* Creats an nxn identity matrix in a. */
-
- void matrixCopy (double *a, double *b);
- /* copies matrix a into matrix b (assumes 4X4) */
-
- void ProduceTransform (Point VRP,Vector u, Vector v, Vector n,
- double Eye,Matrix *Composition);
- /* build the transform matrix that transforms coordinate systems and
- does perspective projects */
-
- void TransformView (ObjectCell *ObjectHead,Matrix Composition);
- /* This routine transforms every vertex into view coordinates, */
- /* and does perspective transformation */
-
- void TransformObject (ObjectCell *Object);
- /* This routine transforms each vertex of the object from object coords.
- to world coordinates */
-